<%--
  Created by IntelliJ IDEA.
  User: DELL
  Date: 2020/11/11
  Time: 19:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>取消管理员</title>
    <style type="text/css" rel="stylesheet">
        body{
            font-family: "楷体";
            font-size: 16px;
        }
        .all{
            width: 850px;
            max-height: 550px;
            overflow: auto;
            border: 2px solid red;
            margin: 0 auto;
            padding: 50px 30px;
            box-sizing: border-box;
            margin-top: 25px;
        }
        .yheader{
            font-size: 18px;
            font-weight: 600;
            color: red;
            margin-bottom: 10px;
        }
        table{
            width: 600px;
            margin: 0 auto;
        }
        input,textarea{
            width: 100%;
            resize: none;
        }
    </style>
    <script src="/WebContent/JQuery/jquery-3.4.1.js" type="text/javascript"></script>
</head>
<body>
<article class="all">
    <div class="yheader">当前位置&nbsp;&gt;&gt;&nbsp;新增会员类型</div>
    <table border="1">
        <form action="/VipType" method="post" id="form">
            <input type="hidden" name="type" value="addtype">
            <tr>
                <th>会员名称</th>
                <th><input type="text" placeholder="请输入会员名称" name="vipname"></th>
            </tr>
            <tr>
                <th>会员时长</th>
                <th><input type="text" placeholder="请输入会员时长" name="viptime"></th>
            </tr>
            <tr>
                <th>会员单价</th>
                <th><input type="text" placeholder="请输入会员价格" name="vipprice"></th>
            </tr>
            <tr>
                <th>会员介绍</th>
                <th><textarea name="vipstate" placeholder="会员介绍"></textarea></th>
            </tr>
            <tr>
                <th><input type="button" value="提交" class="tj"></th>
                <th><input type="reset" value="重置"></th>
            </tr>
        </form>
    </table>


</article>
<script>
    $(document).ready(function () {
        $(".tj").click(function () {
            if($("input[name='vipname']").val() == ""){
                alert("vip类型名不能为空！");
                return false;
            }else if($("input[name='viptime']").val() == ""){
                alert("vip时长名不能为空！");
                return false;
            }else if($("input[name='vipprice']").val() == ""){
                alert("vip单价名不能为空！");
                return false;
            }else if($("textarea[name='vipstate']").val() == ""){
                alert("vip介绍不能为空！");
                return false;
            }else{
                $("#form").submit();
            }
        })
    })
</script>
</body>
</html>
